<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/taglibs.jsp"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>访问token</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" href="${ctxLayui}/layuiadmin/layui/css/layui.css" media="all">
	<!--<link rel="stylesheet" href="${ctxLayui}/layuiadmin/style/myStyle.css" media="all">-->
</head>
<body>
<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 10px 0 0;">
	<div class="layui-row layui-col-space10 layui-form-item">

		<div class="layui-inline ">
			<label class="layui-form-label">编码<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="code" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">企业ID<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="corpId" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">凭证密钥<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="corpSecret" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">代理Id<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<select name="agentId" lay-verify="required" id="agentId" lay-filter="agentId">
				</select>
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">appId<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="appId" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">token<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="token" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">访问token<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="accessToken" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">aesKey<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="aesKey" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">oauth2redirectUri<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="oauth2redirectUri" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">jsapiTicketExpiresTime<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="jsapiTicketExpiresTime" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">过期时间<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="expiresIn" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">生成时间<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" name="time" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">创建时间<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" class="layui-input" name="createTime" id="createTime-laydate" placeholder="yyyy-MM-dd HH:mm:ss">
			</div>
		</div>
		<div class="layui-inline ">
			<label class="layui-form-label">修改时间<span style="color:red">*</span></label>
			<div class="layui-input-inline">
				<input type="text" class="layui-input" name="modifyTime" id="modifyTime-laydate" placeholder="yyyy-MM-dd HH:mm:ss">
			</div>
		</div>
	</div>
	<div class="layui-form-item layui-hide">
		<input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" value="添加">
		<input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="修改">
	</div>
</div>

<script src="${ctxLayui}/layuiadmin/layui/layui.js"></script>
<script>
	layui.config({
		base: '${ctxLayui}/layuiadmin/'
	}).extend({
		index: 'lib/index'
	}).use(['index', 'form','dict','laydate','util'], function(){
		var $ = layui.$ ,form = layui.form;
		var dict = layui.dict;
		var laydate = layui.laydate;
		var layutil = layui.util;
		var formData = window.parent.formData;
		dict.setSelect("agentId","agentId",formData?formData.agentId:1);
		var createTime = formData?(formData.createTime?formData.createTime:new Date()):new Date();
		var createTimeStr = layutil.toDateString(createTime)
		laydate.render({
			elem: '#createTime-laydate',
			type: 'datetime',//type 默认为 date，所以可不填
			value:createTimeStr
		});
		var modifyTime = formData?(formData.modifyTime?formData.modifyTime:new Date()):new Date();
		var modifyTimeStr = layutil.toDateString(modifyTime)
		laydate.render({
			elem: '#modifyTime-laydate',
			type: 'datetime',//type 默认为 date，所以可不填
			value:modifyTimeStr
		});
	})
</script>
</body>
</html>
